package com.gegao.FacadePattern;

/**
 * Created by zhangzhanzhong on 2016/01/07.
 */
public class EncodeFacade {

    private FileReader fileReader;
    private FileWriter fileWriter;
    private CipherMachine cipherMachine;

    public EncodeFacade(){
        fileReader = new FileReader();
        fileWriter = new FileWriter();
        cipherMachine = new CipherMachine();
    }

    public void fileEncrypt(String fileName,String file){
        fileReader.readFile(fileName);
        cipherMachine.encrypt();
        fileWriter.writeFile(file);
    }
}
